package com.viknix.threadpool.manager.client.core;

import com.viknix.threadpool.manager.client.exception.TpmProcessException;
import com.viknix.threadpool.manager.client.listener.Listener;

/**
 * @Author: Dongqi
 * @Date: 2021/10/21 13:32
 * @Version 1.0
 * @Description ConfigService
 */
public interface ConfigService {

    String getConfig(String var1, String var2, long var3) throws TpmProcessException;

    String getConfigAndSignListener(String var1, String var2, long var3, Listener var5) throws TpmProcessException;

    /**
     * Add a listener to the configuration, after the server modified the
     * configuration, the client will use the incoming listener callback.
     * Recommended asynchronous processing, the application can implement the
     * getExecutor method in the ManagerListener, provide a thread pool of
     * execution. If provided, use the main thread callback, May block other
     * configurations or be blocked by other configurations.
     *
     * @param group
     * @param dataId
     * @param listener
     */
    void addListener(String dataId, String group, Listener listener) throws TpmProcessException;

    boolean publishConfig(String var1, String var2, String var3) throws TpmProcessException;

    boolean removeConfig(String var1, String var2) throws TpmProcessException;

    void removeListener(String var1, String var2, Listener var3);

    String getServerStatus();
}
